<template>
    <div class="login-box">

        <el-form :model="form" label-width="auto" style="max-width: 600px">
            <el-form-item label="账号">
                <el-input v-model="form.name" placeholder="请输入邮箱/手机号" />
            </el-form-item>
            <el-form-item label="密码">
                <el-input v-model="form.password" placeholder="请输入密码" />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">登录</el-button>
                <el-button>Cancel</el-button>
            </el-form-item>
        </el-form>

    </div>
</template>

<script setup lang="ts" name="Follow">


import { useStore } from 'vuex';
import { ref, onMounted } from "vue";




//data

const store = useStore();
const form = ref({
    name: '',
    password: '',
})


onMounted(() => {



})

//登录
const onSubmit = () => {
    //登录成功
    store.commit('setIsLogin', true);

}


</script>

<style scoped>
.login-box {
    width: 80%;
    height: 80%;
    margin: 10px auto;
    box-shadow: 0 0 5px #ddd;
    border-radius: 10px;
    overflow: hidden;
}
</style>